﻿using Demo.PetaPoco.Application.Services.Menu;
using Microsoft.AspNetCore.Mvc;
using PmSoft.Web.Abstractions;

namespace Demo.PetaPoco.WebApi.Controllers;

[Route("api/[controller]")]
[ApiController]
public class MenuController(MenuService menuService) : ControllerBase
{

	[HttpGet("all")]
	public async Task<IApiResult> GetAllMenuAsync()
	{
		var routeRecords = await menuService.GetRouteRecordsAsync();
		return ApiResult.Ok(routeRecords);
	}
}
